package org.wangblue;

import org.wangblue.concrete_colleague.ConcreteColleague1;
import org.wangblue.concrete_colleague.ConcreteColleague2;
import org.wangblue.concrete_mediator.ConcreteMediator;

/**
 * @Description: 运行类
 * @Author: WangBlue
 * @Create: 2024-09-25 10:26
 * @Version: 1.0
 **/

public class Main {
    public static void main(String[] args) {
        ConcreteMediator mediator = new ConcreteMediator();
        ConcreteColleague1 concreteColleague1 = new ConcreteColleague1(mediator);
        ConcreteColleague2 concreteColleague2 = new ConcreteColleague2(mediator);
        mediator.setColleague1(concreteColleague1);
        mediator.setColleague2(concreteColleague2);

        mediator.send("你好啊！", concreteColleague1);
        mediator.send("出来干架，同事！", concreteColleague2);
    }

}
